19b5b24b565c452086c747abbcc65d2e26e81228,impl/src/main/java/javax/faces/component/MethodExpressionMethodBindingAdapter.java,MethodExpressionMethodBindingAdapter,restoreState,#FacesContext#Object#,244
Before Change
Class toRestoreClass = null;
if (null != className) {
try {
toRestoreClass = loadClass(className, this);
}
catch (ClassNotFoundException e) {
throw new IllegalStateException(e.getMessage());
}
if (null != toRestoreClass) {
try {
result =
(MethodBinding) toRestoreClass.newInstance();
}
catch (InstantiationException e) {
throw new IllegalStateException(e.getMessage());
}
catch (IllegalAccessException a) {
throw new IllegalStateException(a.getMessage());
}
}
if (null != result && null != savedState) {
// don't need to check transient, since that was
// done on the saving side.
((StateHolder)result).restoreState(context, savedState);
After Change
if (!(state instanceof MethodBinding)) {
Object[] stateStruct = (Object[]) state;
Object savedState = stateStruct[0];
String className = stateStruct[1].toString();
MethodBinding result = null;
if (className != null) {
Class<?> toRestoreClass = loadClass2(className, this);
if (toRestoreClass != null) {
result = newInstance(toRestoreClass);
}
if (!isAnyNull(result, savedState)) {
// don't need to check transient, since that was
// done on the saving side.
((StateHolder) result).restoreState(context, savedState);